from info import create_app,db,models
from flask_migrate import Migrate,MigrateCommand
from flask_script import Manager


app = create_app("develop")

#2,创建manage对象管理app
manager =Manager(app)

#3.使用Migrate将app和db关联在一起
Migrate(app,db)

#4.添加操作命令使用,MigrateCommand
manager.add_command("db",MigrateCommand)
# @app.route('/',methods=["GET","POST"])
# def hello_world():
#
#     #1.测试数据库
#     # db.create_all()
#
#     #2.测试redis存取数据
#     #redis_store.setex("image_code,"10,"BBCC")
#     # redis_store.set("image_code","BBCC",10)
#
#     #3.测试session的存储
#     # session["user_name"] ="laowang"
#     return 'helloworld'



if __name__ == '__main__':
    manager.run()